#!/bin/sh

uci -q batch <<-EOF >/dev/null
	delete firewall.shadowsocks
	set firewall.shadowsocks=include
	set firewall.shadowsocks.type=script
	set firewall.shadowsocks.path=/etc/firewall.shadowsocks
	set firewall.shadowsocks.reload=1
	commit firewall
EOF

/etc/init.d/shadowsocks enable >/dev/null 2>&1

exit 0
